/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */
package enterprise.ent;

import java.io.Serializable;
import java.util.Date;
import javax.persistence.Basic;
import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.GeneratedValue;
import javax.persistence.GenerationType;
import javax.persistence.Id;
import javax.persistence.Lob;
import javax.persistence.NamedQueries;
import javax.persistence.NamedQuery;
import javax.persistence.Table;
import javax.persistence.Temporal;
import javax.persistence.TemporalType;
import javax.validation.constraints.NotNull;
import javax.validation.constraints.Size;
import javax.xml.bind.annotation.XmlRootElement;

/**
 *
 * @author JAVIER
 */
@Entity
@Table(name = "solicitudes")
@XmlRootElement
@NamedQueries({
    @NamedQuery(name = "Solicitudes.findAll", query = "SELECT s FROM Solicitudes s"),
    @NamedQuery(name = "Solicitudes.findBySolId", query = "SELECT s FROM Solicitudes s WHERE s.solId = :solId"),
    @NamedQuery(name = "Solicitudes.findBySolTipo", query = "SELECT s FROM Solicitudes s WHERE s.solTipo = :solTipo"),
    @NamedQuery(name = "Solicitudes.findBySolFecha", query = "SELECT s FROM Solicitudes s WHERE s.solFecha = :solFecha"),
    @NamedQuery(name = "Solicitudes.findBySolUser", query = "SELECT s FROM Solicitudes s WHERE s.solUser = :solUser"),
    @NamedQuery(name = "Solicitudes.findBySolEstado", query = "SELECT s FROM Solicitudes s WHERE s.solEstado = :solEstado"),
    @NamedQuery(name = "Solicitudes.findBySolDestinatario", query = "SELECT s FROM Solicitudes s WHERE s.solDestinatario = :solDestinatario"),
    @NamedQuery(name = "Solicitudes.findBySolJugadoralta", query = "SELECT s FROM Solicitudes s WHERE s.solJugadoralta = :solJugadoralta"),
    @NamedQuery(name = "Solicitudes.findBySolAvisoemail", query = "SELECT s FROM Solicitudes s WHERE s.solAvisoemail = :solAvisoemail"),
    @NamedQuery(name = "Solicitudes.findBySolAvisoapp", query = "SELECT s FROM Solicitudes s WHERE s.solAvisoapp = :solAvisoapp"),
    @NamedQuery(name = "Solicitudes.findBySolAvisodestiemail", query = "SELECT s FROM Solicitudes s WHERE s.solAvisodestiemail = :solAvisodestiemail"),
    @NamedQuery(name = "Solicitudes.findBySolUser_UserView", query = "SELECT s FROM Solicitudes s WHERE s.solEstado < 9 and s.solUser = :solUser"),
    @NamedQuery(name = "Solicitudes.findBySolMotivo", query = "SELECT s FROM Solicitudes s WHERE s.solMotivo = :solMotivo")})
public class Solicitudes implements Serializable {
    private static final long serialVersionUID = 1L;
    @Id
    @GeneratedValue(strategy = GenerationType.IDENTITY)
    @Basic(optional = false)
    @Column(name = "sol_id")
    private Integer solId;
    @Basic(optional = false)
    @NotNull
    @Column(name = "sol_tipo")
    private int solTipo;
    @Basic(optional = false)
    @NotNull
    @Column(name = "sol_fecha")
    @Temporal(TemporalType.TIMESTAMP)
    private Date solFecha;
    @Basic(optional = false)
    @NotNull
    @Column(name = "sol_user")
    private Long solUser;
    @Basic(optional = false)
    @NotNull
    @Lob
    @Size(min = 1, max = 2147483647)
    @Column(name = "sol_detalle")
    private String solDetalle;
    @Basic(optional = false)
    @NotNull
    @Column(name = "sol_estado")
    private Integer solEstado;
    @Basic(optional = false)
    @NotNull
    @Column(name = "sol_destinatario")
    private int solDestinatario;
    @Column(name = "sol_jugadoralta")
    private Integer solJugadoralta;
    @Column(name = "sol_avisoemail")
    private Integer solAvisoemail;
    @Column(name = "sol_avisoapp")
    private Integer solAvisoapp;
    @Column(name = "sol_avisodestiemail")
    private Integer solAvisodestiemail;
    @Size(max = 200)
    @Column(name = "sol_motivo")
    private String solMotivo;

    public Solicitudes() {
    }

    public Solicitudes(Integer solId) {
        this.solId = solId;
    }

    public Solicitudes(Integer solId, Integer solTipo, Date solFecha, Long solUser, String solDetalle, Integer solEstado, int solDestinatario) {
        this.solId = solId;
        this.solTipo = solTipo;
        this.solFecha = solFecha;
        this.solUser = solUser;
        this.solDetalle = solDetalle;
        this.solEstado = solEstado;
        this.solDestinatario = solDestinatario;
    }

    public Integer getSolId() {
        return solId;
    }

    public void setSolId(Integer solId) {
        this.solId = solId;
    }

    public int getSolTipo() {
        return solTipo;
    }

    public void setSolTipo(int solTipo) {
        this.solTipo = solTipo;
    }

    public Date getSolFecha() {
        return solFecha;
    }

    public void setSolFecha(Date solFecha) {
        this.solFecha = solFecha;
    }

    public Long getSolUser() {
        return solUser;
    }

    public void setSolUser(Long solUser) {
        this.solUser = solUser;
    }

    public String getSolDetalle() {
        return solDetalle;
    }

    public void setSolDetalle(String solDetalle) {
        this.solDetalle = solDetalle;
    }

    public Integer getSolEstado() {
        return solEstado;
    }

    public void setSolEstado(Integer solEstado) {
        this.solEstado = solEstado;
    }

    public int getSolDestinatario() {
        return solDestinatario;
    }

    public void setSolDestinatario(int solDestinatario) {
        this.solDestinatario = solDestinatario;
    }

    public Integer getSolJugadoralta() {
        return solJugadoralta;
    }

    public void setSolJugadoralta(Integer solJugadoralta) {
        this.solJugadoralta = solJugadoralta;
    }

    public Integer getSolAvisoemail() {
        return solAvisoemail;
    }

    public void setSolAvisoemail(Integer solAvisoemail) {
        this.solAvisoemail = solAvisoemail;
    }

    public Integer getSolAvisoapp() {
        return solAvisoapp;
    }

    public void setSolAvisoapp(Integer solAvisoapp) {
        this.solAvisoapp = solAvisoapp;
    }

    public Integer getSolAvisodestiemail() {
        return solAvisodestiemail;
    }

    public void setSolAvisodestiemail(Integer solAvisodestiemail) {
        this.solAvisodestiemail = solAvisodestiemail;
    }

    public String getSolMotivo() {
        return solMotivo;
    }

    public void setSolMotivo(String solMotivo) {
        this.solMotivo = solMotivo;
    }

    @Override
    public int hashCode() {
        int hash = 0;
        hash += (solId != null ? solId.hashCode() : 0);
        return hash;
    }

    @Override
    public boolean equals(Object object) {
        // TODO: Warning - this method won't work in the case the id fields are not set
        if (!(object instanceof Solicitudes)) {
            return false;
        }
        Solicitudes other = (Solicitudes) object;
        if ((this.solId == null && other.solId != null) || (this.solId != null && !this.solId.equals(other.solId))) {
            return false;
        }
        return true;
    }

    @Override
    public String toString() {
        return "enterprise.ent.Solicitudes[ solId=" + solId + " ]";
    }
    
}
